home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
271_02
/
rmwhite.doc
< prev
next >
Wrap
Text File
|
1987-08-16
|
1KB
|
45 lines
NAME
rmlead -- remove leading whitespace from string
rmtrail -- " trailing " " "
rmallws -- " all " " "
SYNOPSIS
(void) rmlead(str);
(void) rmtrail(str);
(void) rmallws(str);
char *str; string to modify
DESCRIPTION
These string functions will modify the specified string
in place. White space is defined as the space character,
tab character, vertical tab, linefeed, carriage return,
and formfeed. String size is limited to 255 characters,
although the source code can be modified to increase or
decrease that. If the string exceeds that size, it is
truncated.
EXAMPLE
char string[] = " This is a string \n";
rmhead(string); /* returns "This is a string \n" */
rmtail(string); /* returns " This is a string" */
rmallws(string); /* returns "Thisisastring" */
This function is found in SMTCx.LIB for the Turbo-C Compiler.